<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 必须的 meta 标签 -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap 的 CSS 文件 -->
    <link th:href="@{/ifavicon.ico}" rel="shortcut icon"/>
    <link th:href="@{/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
    <title>订单列表</title>
</head>
<body>
<ul class="nav">
    <li class="nav-item">
        <a class="nav-link active" href="javascript:void (0);">订单列表</a>
    </li>
</ul>
<table class="table">
    <thead>
    <tr>
        <th scope="col">订单ID</th>
        <th scope="col">商品ID</th>
        <th scope="col">订单状态</th>
        <th scope="col">下单时间</th>
        <th scope="col">结束时间</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="order:${orderList}">
        <th scope="row" th:text="${order.id}"></th>
        <td th:text="${order.goodsId}"></td>
        <td th:if="${order.state} == 0" th:text="待支付"></td>
        <td th:if="${order.state} == 1" th:text="已支付"></td>
        <td th:if="${order.state} == 2" th:text="已取消"></td>
        <td th:text="${order.startTime}"></td>
        <td th:text="${order.endTime}"></td>
    </tr>
    </tbody>
</table>

<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
</body>
</html>